#ifndef CMD_UART_H
#define CMD_UART_H


/******************************************************************************
 Macro
 *****************************************************************************/
#define CMD_UART_BUF_SIZE      32
//#define CMD_UART_BAUD          115200
   
#define CMD_STATE_IDLE         0
#define CMD_STATE_START        1
#define CMD_STATE_DATA         2
#define CMD_STATE_ERRO         3

typedef struct
{
  osal_event_hdr_t hdr;
  uint8 size;
  uint8 data[];
}cmd_uartRxMsg_t;

typedef struct
{
  void* next;
  uint8 size;
  uint8 data[];
}cmd_uartTxList_t;

void cmd_uartInit(uint8 taskId);
void cmd_uartRxTimeout(void);
void cmd_uartTxTimeout(void);
bool cmd_uartSend(uint8_t* buff, uint16_t size);

#endif
